﻿<div class="panel panel-default">
    <!--ng-controller="DeSpeAttrAddCtrl"-->
    <div class="panel-heading font-bold">数据元 - {{type}}</div>
    <div class="panel-body">
        <form name="form" class="bs-example form-horizontal form-validation">
            <div class="form-group">
                <label class="col-lg-2 control-label">标识符<span class="message">*</span></label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元标识符" ng-model="deSpeAttr.Code" required set-focus />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">名称<span class="message">*</span></label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元名称" ng-model="deSpeAttr.Value" ng-blur="getInputCode()" required />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">输入码</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="输入码" ng-model="deSpeAttr.InputCode" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">定义</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元的定义" ng-model="deSpeAttr.Definition" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">数据类型<span class="message">*</span></label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元值的数据类型" ng-model="deSpeAttr.DataType" required />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">表示格式<span class="message">*</span></label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元值的表示格式" ng-model="deSpeAttr.DataFormat" required />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">允许值</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="数据元允许的值" ng-model="deSpeAttr.AllowableValue" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">状态</label>
                <div class="col-lg-10">
                    <select class="form-control" ng-model="deSpeAttr.StatusCode" required ng-disabled="type=='添加'">
                        <option value="1">创建</option>
                        <option value="2">待审核</option>
                        <option value="3">使用中</option>
                        <option value="4">作废</option>
                    </select>
                </div>
            </div>
            <div class="line line-dashed b-b line-lg"></div>
            <div class="form-group">
                <div class="col-lg-10 col-lg-offset-2">
                    <button type="submit" class="btn btn-success" ng-click="ok()" ng-disabled="form.$invalid">保存</button>
                    <button type="submit" class="btn btn-primary" ng-click="okNext()" ng-disabled="form.$invalid" ng-if="type=='添加'">保存并继续添加</button>
                    <button type="submit" class="btn btn-default" ng-click="cancel()">取消</button>
                    <span class="message">{{message}}</span>
                </div>
            </div>
        </form>
    </div>
</div>